package com.dxj.request;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.dxj.domain.Role;
import com.dxj.domain.User;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @author dxj
 * @Description 新增角色和权限入参
 * @date 2024/7/30 22:06
 */
@Data
@AutoMapper(target = Role.class)
public class RolePermissionDTO {
    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", required = true, example = "admin")
    @NotBlank(message = "角色名称不能为空")
    private String roleName;
    /**
     * 角色描述
     */
    @ApiModelProperty(value = "角色描述", required = true, example = "管理员")
    @NotBlank(message = "角色描述不能为空")
    private String description;
    /**
     * 权限id集合
     */
    @ApiModelProperty(value = "权限id集合", required = true, example = "[1,2,3]")
    @NotEmpty(message="权限id集合不为空")
    private List<Long> permissionId;
}
